﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication2
{
    public partial class DodajZaswiadczenie : Form
    {
        Form2 F;
        public DodajZaswiadczenie(Form2 F)
        {
            InitializeComponent();
            this.F = F;
        }

        private void DodajZaswiadczenie_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            string wyn = "insert into akty ( Rodzaj,Numer_Księgi, Numer_Wpisu, Id, ks, Data) values (";
            //wyn += "\'"+textBox1.Text + "', ";
            wyn += "\'" + textBox2.Text + "', ";
            wyn += textBox3.Text + ", ";
            wyn += textBox4.Text + ", ";
            wyn += textBox5.Text + ", ";
            wyn += textBox6.Text + ", ";
            wyn += "\'"+textBox7.Text + "'); ";
            BazaDaych.Wykonaj(wyn);
            F.pokazwszystko();
            this.Close();
        }
    }
}
